projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bba8cef
)
add babl_format_get_model
author
Øyvind Kolås
<pippin@gimp.org>
Wed, 25 Apr 2012 23:17:41 +0000
(
01:17
+0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Wed, 25 Apr 2012 23:17:41 +0000
(
01:17
+0200)
babl/babl-format.c
patch
|
blob
|
history
babl/babl.h
patch
|
blob
|
history
diff --git
a/babl/babl-format.c
b/babl/babl-format.c
index 7f43911f2f7be6d9e34d5b21f914f475bbf9a582..0a7a840409fb64ce73f2568569b8d586dd09015c 100644
(file)
--- a/
babl/babl-format.c
+++ b/
babl/babl-format.c
@@
-653,4
+653,16
@@
babl_set_user_data (const Babl *cbabl, void *data)
}
}
+const Babl *
+babl_format_get_model (const Babl *format)
+{
+ if (format->class_type == BABL_FORMAT)
+ {
+ return (Babl*)format->format.model;
+ }
+ return NULL;
+}
+
BABL_CLASS_IMPLEMENT (format)
+
+
diff --git
a/babl/babl.h
b/babl/babl.h
index 5e6cf42ff787bec3eb5ee9b1b406070d4481c95f..c1c5e9dbb6b237c68fdab03cbbb67fe18f3d8eef 100644
(file)
--- a/
babl/babl.h
+++ b/
babl/babl.h
@@
-104,6
+104,11
@@
int babl_format_has_alpha (const Babl *format);
*/
int babl_format_get_bytes_per_pixel (const Babl *format);
+/**
+ * Return the model used for constructing the format.
+ */
+const Babl * babl_format_get_model (const Babl *format);
+
/**
* Returns the number of components for the given @format.
*/